function drawTank(tank) {
	var tankWheelWidth = 6;
	var tankWheelHeight = 30;
	var tankMainWidth = 16;
	var tankMainHeight = 16;

	var tankX = tank.x;
	var tankY = tank.y;
	// 若是英雄tank就为单一颜色，若是敌机颜色
	var tankMainColor  = tank instanceof Hero ? tank.color[0] : tank.color[tank.life-1][0];
	var tankSecondColor= tank instanceof Hero ? tank.color[1] : tank.color[tank.life-1][1];
	switch(tank.direct) {
		case 0:
		case 2:
			// 坦克主体颜色
			cxt.fillStyle = tankMainColor;
			cxt.fillRect(tankX, tankY, tankWheelWidth, tankWheelHeight);
			cxt.fillRect(tankX + tankWheelWidth + tankMainWidth + 2, tankY, tankWheelWidth, tankWheelHeight);
			cxt.fillRect(tankX + tankWheelWidth + 1, tankY + (tankWheelHeight - tankMainHeight) / 2, tankMainWidth, tankMainHeight);
			// 坦克炮筒和盖子颜色
			cxt.fillStyle = tankSecondColor;
			cxt.arc(tankX + tankMainWidth / 2 + tankWheelWidth + 1, tankY + tankWheelHeight / 2, tankMainWidth / 2 - 1, 0, 360, false);
			// cxt.closePath();
			cxt.fill();
			// 子弹-------------------------
			if(tank.bullet) {
				cxt.fillStyle = '#ffffff';
				cxt.beginPath();
				cxt.arc(tank.bullet.x, tank.bullet.y, 1, 0, Math.PI * 2, true);
				cxt.closePath();
				cxt.fill();
				cxt.fillStyle = tankSecondColor;
			}
			// -----------------------------
			cxt.strokeStyle = tankSecondColor;
			cxt.beginPath();
			cxt.lineWidth = 4;
			cxt.moveTo(tankX + tankMainWidth / 2 + tankWheelWidth + 1, tankY + tankWheelHeight / 2);
			if(tank.direct === 0) {
				cxt.lineTo(tankX + tankMainWidth / 2 + tankWheelWidth + 1, tankY);

			} else if(tank.direct === 2) {
				cxt.lineTo(tankX + tankMainWidth / 2 + tankWheelWidth + 1, tankY + tankWheelHeight);
			}
			cxt.closePath();
			cxt.stroke();
			break;
		case 1:
		case 3:
			cxt.fillStyle = tankMainColor;
			cxt.fillRect(tankX, tankY, tankWheelHeight, tankWheelWidth);
			cxt.fillRect(tankX, tankY + tankWheelWidth + tankMainWidth + 2, tankWheelHeight, tankWheelWidth);
			cxt.fillRect(tankX + tankWheelWidth + 1, tankY + (tankWheelHeight - tankMainHeight) / 2, tankMainWidth, tankMainHeight);

			cxt.fillStyle = tankSecondColor;
			cxt.arc(tankX + tankMainWidth / 2 + tankWheelWidth + 1, tankY + tankWheelHeight / 2, tankMainWidth / 2 - 1, 0, 360, false);
			cxt.fill();
			// 子弹-------------------------
			if(tank.bullet) {
				cxt.fillStyle = '#ffffff';
				cxt.beginPath();
				cxt.arc(tank.bullet.x, tank.bullet.y, 1, 0, Math.PI * 2, true);
				cxt.closePath();
				cxt.fill();
				cxt.fillStyle = tankSecondColor;
			}
			// -----------------------------
			cxt.strokeStyle = tankSecondColor;
			cxt.beginPath();
			cxt.lineWidth = 4;
			cxt.moveTo(tankX + tankMainWidth / 2 + tankWheelWidth + 1, tankY + tankWheelHeight / 2);
			if(tank.direct === 1)
				cxt.lineTo(tankX + tankWheelHeight, tankY + tankWheelHeight / 2);
			else if(tank.direct === 3)
				cxt.lineTo(tankX, tankY + tankWheelHeight / 2)
			cxt.closePath();
			cxt.stroke();
			break;
	}
}